{extend name="ashippingguide/Public/base" /}
{block name="container"}
<div class="page-heade">
    <h2 class="title_color text-center">{$title}劳动合同的职员</h2>
</div>
<table class="table-bordered table">
    <tr>
        <td><a onclick='window.open("/index/ashippingguide/exportLabourContractAnalysis?id="+"{$arr}"+"&title="+"{$title}","_self");' class="btn btn-info btn-sm">导出Excel</a><span class="lr_5"></span><a href="javascript:;" class="btn btn-info btn-sm" id="qslabor">{$title}劳动合同的导购人员生成劳动合同</a><span class="lr_5"></span><button class="btn btn-sm btn-info" type="button" onclick="back()">返回</button></td>
    </tr>
</table>
<table class="table table-striped table-bordered table-hover bud_hei text-center" style="width: 100%;">
    <tr class="info">
        <td style="width: 7%">No.</td>
        <td style="width: 80%" class="text-left">所在网点名称(城市-系统-网点)</td>
        <td style="width: 13%">姓名</td>
    </tr>
    {volist name="data" id="list"}
    <tr>
        <td>{$i}</td>
        <td style="width: 80%" class="text-left"><a href="/index/net/view/?id={$list.wd_id}"
                                      class="J_menuItem">{$list.wd}</a></td>
        <td>{$list.name}</td>
    </tr>
    {/volist}
</table>
<script>
    $("#qslabor").click(function(){
        swal({
                title: "确定此操作吗？",
                text: "",
                type: "warning",
                showCancelButton: true,
                confirmButtonColor: "#DD6B55",
                confirmButtonText: "确定！",
                closeOnConfirm: false
            },
            function(){
            $.get("{:url('createLabourContract')}",{id:"{$arr}"},function (e) {
                if(e.success){
                    swal("生成合同成功,前往导购劳动合同管理进行完善！", "", "success");
                }else{
                    swal("网络错误，请稍后重试！", "", "warning");
                }

            },'json');
            });
    });
    function back(){
        history.go(-1)
    }
</script>
{/block}
